/*
* $Id: JournalView.cpp 28 2010-02-09 20:33:18Z volok-aleksej@yandex.ru $
*
* Copyright 2009 by Volokitin Alexey
* All rights reserved
*
*/
#include "Common/include.h"
#include "JournalView.h"

CJournalView::CJournalView(IStyle* pStyle){
	m_pStyle = pStyle;
}
CJournalView::~CJournalView(){
	m_pStyle->Free();
}
IStyle* CJournalView::GetStyleView(){
	return m_pStyle;
}
long CJournalView::OnWndMsg(unsigned int message, unsigned int wParam, long lParam){
	return 0;
}
long CJournalView::Send( unsigned int nMessage, unsigned int wParam, long lParam ){
	return (long)SendMessage(m_hWnd, nMessage, wParam, lParam);
}
bool CJournalView::Post(unsigned int nMessage, unsigned int wParam, long lParam){
	return PostMessage(m_hWnd, nMessage, wParam, lParam);
}
void CJournalView::Redraw(){
	InvalidateRect(m_hWnd, NULL, TRUE);
}
bool CJournalView::IsCreate(){
	return IsWindow(m_hWnd);
}
int CJournalView::GetWinId(){
	int id = 0;
	if(IsCreate())
		id = GetDlgCtrlID(m_hWnd);
	return id;
}
void CJournalView::Free(){
	delete this;
}

void CJournalView::Resize(int x, int y, int cx, int cy){
	MoveWindow(m_hWnd, x, y, cx, cy, TRUE);
}

void CJournalView::Focus(){
	SetFocus(m_hWnd);
}